<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * home
 *
 * @package default
 * @author
 **/
class Guestbook_model extends CI_Model {
	
	function __construct()
	{
		parent::__construct();
	}

	public function get_lists($fields="*",$cond=NULL,$limit=NULL,$sort=NULL){
		$sql = "SELECT * FROM {$this->db->dbprefix}guestbook";
		if($cond != NULL){
			$sql .= " WHERE ".$cond;
		}		
		if($sort != NULL){
			$sql .= " ORDER BY {$sort}";
		}
		if($limit!=NULL){
			$sql .= " limit ".$limit;
		}
		$rs = $this->db->query($sql);
		return $rs->result();
	}
	
	

}
/* End of file guestbook_model.php */
/* Location: ./application/model/guestbook_model.php */